@extends('layouts.default')
@section('content')
<div class="box">
    <header>
        <div class="icons">
            <i class="fa fa-table"></i>
        </div>
        <h5>{{ Lang::get('messages.insert_history') }}</h5>
    </header>
    <div id="collapse4" class="body">
        <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped">
            <thead>
                <tr><th>{{Lang::get('messages.vehicle')}}</th>
                    <th>{{ Lang::get('messages.action') }} </th>
                    <th>{{ Lang::get('messages.date') }} </th>
                </tr>
            </thead>
            <tbody>
                @foreach($car as $c ) 
                <tr><td>{{$c->Make.' '.$c->License}}</td>
                    <td><p class="text-info">
                            {{$c->username}} {{Lang::get('messages.added_car')}}
                            {{Lang::get('messages.model')}}: {{ isset($c->Model)?$c->Model:''}},
                            {{Lang::get('messages.make')}}: {{ isset($c->Make)?$c->Make:''}}, 
                            {{Lang::get('messages.license')}}: {{ isset($c->License)?$c->License:''}},
                            {{Lang::get('messages.milage')}}: {{ isset($c->Milage)?$c->Milage:''}}
                        </p></td>
                    <td><p class="text-warning">{{isset($c->created_at)?$c->created_at:''}}</p></td>
                </tr>                 
                @endforeach
                @foreach($insur_docs as $i )
                <tr><td>{{$i->Make.' '.$i->License}}</td>
                    <td><p class="text-info">{{isset($i->username)?$i->username:''}} 
                            {{ Lang::get('messages.added_insur_docs')}}</p></td>
                    <td><p class="text-warning">{{isset($i->created_at)?$i->created_at:''}}</p></td>
                </tr>
                @endforeach
                @foreach($maintenance as $m )
                <tr><td>{{$m->Make.' '.$m->License}}</td>
                    <td><p class="text-info">{{isset($m->username)?$m->username:''}} 
                            {{ Lang::get('messages.added_maintenance')}}{{ Lang::get($m->process)}}</p></td>
                    <td><p class="text-warning">{{isset($m->created_at)?$m->created_at:''}}</p></td>
                </tr>
                @endforeach
                @foreach($repairs as $r )
                <tr><td>{{$r->Make.' '.$r->License}}</td>
                    <td><p class="text-info">{{isset($r->username)?$r->username:''}} 
                            {{ Lang::get('messages.added_repair')}}{{ Lang::get('repair.'.$r->repair)}}</p></td>
                    <td><p class="text-warning">{{isset($r->created_at)?$r->created_at:''}}</p></td>
                </tr>
                @endforeach
                @foreach($repair_parts as $p )
                <tr><td></td>
                    <td><p class="text-info">{{isset($p->username)?$p->username:''}} 
                            {{ Lang::get('messages.added_repair_part')}}{{ Lang::get('repair.'.$p->repair)}}</p></td>
                    <td><p class="text-warning">{{isset($p->created_at)?$p->created_at:''}}</p></td>
                </tr>
                @endforeach
                @foreach($processes as $d )
                <tr><td></td>
                    <td><p class="text-info">{{isset($d->username)?$d->username:''}} 
                            {{ Lang::get('messages.added_process')}} {{ Lang::get('process.'.$d->process)}}</p></td>
                    <td><p class="text-warning">{{isset($d->created_at)?$d->created_at:''}}</p></td>
                </tr>
                @endforeach
            </tbody>
        </table>
    </div>
</div>
@stop